<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<?php

$con = mysql_connect("localhost","root","kabra");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("db2", $con);


 
 if (isset($_GET['id']) && is_numeric($_GET['id']))
 {

 $id = $_GET['id'];
 
 $result = mysql_query("DELETE FROM events2 WHERE id=$id")
 or die(mysql_error()); 
 
 header("Location: eventsView.php");
 }
 else
 
 {
 header("Location: eventsView.php");
 }
 
?>


</body>
</html>